package com.shms.action;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.shms.bean.IndexParam;
import com.shms.constant.QueryConstant;
import com.shms.entity.ShMessage;
import com.shms.entity.ShPoint;
import com.shms.entity.ShTrends;
import com.shms.service.ShMessageService;
import com.shms.service.ShPointService;
import com.shms.service.ShTrendsService;

/**
 * 文件名：IndexAction.java
 * 编写者：
 * 创建时间：2013-1-3
 * 简要描述：
 * 访问主页时的控制文件
 */
public class IndexAction extends ActionSupport {
	
	private static final long serialVersionUID = 3124523634744181472L;
	private ShTrendsService shTrendsService;
	private List<ShTrends> shTrendsList;
	private ShMessageService shMessageService;
	private List<ShMessage> shMessageList;
	private ShPointService shPointService;
	private List<ShPoint> shPointList;
	
	public String execute() {
		IndexParam indexParam = new IndexParam();
		indexParam.setParam(QueryConstant.Index_Tredns);
		shTrendsList = shTrendsService.queryTrendsByExample(indexParam);
		shMessageList = shMessageService.queryMessageByExample(indexParam);
		shPointList = shPointService.queryPointByExample(indexParam);
		return SUCCESS;
	}

	public void setShTrendsService(ShTrendsService shTrendsService) {
		this.shTrendsService = shTrendsService;
	}

	public List<ShTrends> getShTrendsList() {
		return shTrendsList;
	}

	public void setShTrendsList(List<ShTrends> shTrendsList) {
		this.shTrendsList = shTrendsList;
	}

	
	public List<ShMessage> getShMessageList() {
		return shMessageList;
	}

	public void setShMessageList(List<ShMessage> shMessageList) {
		this.shMessageList = shMessageList;
	}

	public void setShMessageService(ShMessageService shMessageService) {
		this.shMessageService = shMessageService;
	}

	public List<ShPoint> getShPointList() {
		return shPointList;
	}

	public void setShPointList(List<ShPoint> shPointList) {
		this.shPointList = shPointList;
	}

	public void setShPointService(ShPointService shPointService) {
		this.shPointService = shPointService;
	}
}
